home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / program / ntwn32.zip / NTWN32.TXT < prev   
Text File  |  1992-01-02  |  20KB  |  391 lines

  1. The Windows 32-Bit API: An Overview
  2.  
  3. Since its original release in 1985, MicrosoftR  WindowsTM has become
  4. the leading graphical system for IBMR compatible personal computers.
  5. Version 3.0, released in May 1990, was a milestone that broke the 640K
  6. barrier of the Microsoft MS-DOSR operating system by running
  7. applications in protected mode, thus making it possible to develop
  8. much more sophisticated applications. This innovation spawned myriad
  9. applications and is responsible for the huge success of the Windows
  10. environment in the marketplace showcased by the volume of graphical
  11. applications sold (see Figures 1 and 2).
  12.  
  13. Between May 1990 and May 1991, more than 4 million copies of Version
  14. 3.0 were sold. International Data Corporation estimates that an
  15. additional 7.8 million copies will be sold during 1992. In addition,
  16. more than 66 thousand Microsoft Windows Software Development Kits
  17. version 3.0 have been shipped, a clear indication of the number of
  18. applications likely to appear during the next 12 to 18 months. By
  19. spring 1991, more than 1200 Windows-based applications were shipping.
  20.  
  21. Building on this achievement and on the success of independent
  22. software developers, Microsoft is extending and expanding the Windows
  23. environment so that Windows-based applications can run on a broad
  24. range of computing platforms - from low-end battery-operated portables
  25. to high-end RISC workstations and multiprocessor servers.
  26.  
  27. We are expanding Windows to make it fully 32-bit, and are adding
  28. additional operating system services. Microsoft Windows for Pen
  29. Computing and Microsoft Windows with Multimedia Extensions will also
  30. take advantage of new hardware technologies.
  31.  
  32. Windows Today
  33.  
  34. Today many people think of Windows as a graphical add-on to the
  35. familiar MS-DOS operating system they have used for years.  This
  36. perception took much of the fear out of upgrading to Windows for the
  37. end user. But in fact, Windows is not limited by MS-DOS.
  38.  
  39. Windows is a complete operating system that provides extra features on
  40. top of MS-DOS and replaces certain MS-DOS features.  Windows Version
  41. 3.0 does not use MS-DOS screen or keyboard I/O, does not use MS-DOS
  42. memory management, and can even bypass MS-DOS file I/O with new
  43. Windows-specific device drivers. Version 3.0 Enhanced-mode can handle
  44. 32-bit device drivers that are not limited by the infamous 640K MS-DOS
  45. barrier. These drivers talk through Windows to applications that are
  46. also not limited by the constraints of MS-DOS.
  47.  
  48. The advantage of being able to work with MS-DOS is that it preserves
  49. the value added by MS-DOS's long life span (in computer years).
  50. Windows can run with MS-DOS TSRs, MS-DOS device drivers, and of
  51. course, it can run MS-DOS applications.  Future versions of Windows
  52. will continue to be available on MS-DOS.
  53.  
  54. The Windows Architecture
  55.  
  56. Since the IBM PC was introduced in 1981, personal computers have
  57. become much more diverse in capability and in configuration. This
  58. diversity will increase in the next few years as personal computers
  59. based on RISC processors and multiprocessor systems are introduced.
  60.  
  61. These diverse systems have different operating system needs.  For
  62. example, a low-end battery-operated portable requires minimal memory
  63. and hard disk footprint to minimize weight and cost.  It also requires
  64. power management to extend battery life.  In contrast, network servers
  65. and mission-critical desktops require sophisticated security to ensure
  66. the integrity of data.  RISC-based systems require portability for
  67. both the operating system and the applications.
  68.  
  69. Some vendors feel that the diverse range of hardware requires totally
  70. different operating systems with incompatible applications.  They sell
  71. different operating systems for personal computers, workstations,
  72. servers, and in the future, pen-based systems.  Each of their
  73. operating systems require unique, incompatible applications.
  74. Connectivity between these divergent platforms is complicated.
  75.  
  76. Microsoft is focused on a much simpler solution.  We're extending
  77. Windows into multiple, fully compatible implementations.  Different
  78. implementations of Windows will be optimized for different classes of
  79. hardware.  Customer investment in Windows development and Windows
  80. applications will be protected.  Windows applications will run across
  81. the spectrum of hardware, from notepad-sized pen systems, to mission-
  82. critical desktops, to multiprocessor and RISC based systems.
  83.  
  84. Microsoft Windows is evolving into a complete operating system
  85. architecture.  The Windows architecture addresses diverse requirements
  86. by supporting different modes of operation.  Today Windows has three
  87. modes: Real-mode, Standard-mode, and Enhanced-mode.  Real-mode
  88. provides compatibility with previous versions of Microsoft Windows.
  89. Standard-mode is optimized for an 80286 processor and provides access
  90. to the full 16 MB of memory supported by that chip.  Enhanced-mode
  91. takes advantage of the 80386 and 80486 processors by providing support
  92. for multiple DOS applications and thru a technique called demand
  93. paging, provides applications with access to more memory then is
  94. physically present in the machine.  All three modes support both DOS
  95. and Windows applications.
  96.  
  97. Building upon the success of Microsoft Windows Version 3.0, Microsoft
  98. will introduce Version 3.1 in late 1991.  Version 3.1 incorporates
  99. significant customer feedback; it improves performance, introduces a
  100. newly designed file manager, improves network connectivity, and
  101. improves system reliability.  Version 3.1 will support Windows
  102. Standard-mode and Enhanced-mode.
  103.  
  104. Also during 1991, Microsoft will enhance Windows Standard-mode and
  105. Enhanced-mode by providing extensions for sound, animation, and CD-ROM
  106. access, called Windows with Multimedia.  We will also release
  107. extensions for clipboard and pen-style computing, called Microsoft
  108. Windows for Pen Computing.
  109.  
  110. Windows NT
  111.  
  112. In 1992, Microsoft will introduce a new product called Windows NT (New
  113. Technology).  Windows NT is built on a modern, 32-bit, operating
  114. system kernel.   Windows NT will deliver an extremely robust client
  115. environment for mission-critical applications, a high-end desktop
  116. platform, and a portable, scalable server environment (See Figure 3).
  117. Windows NT will also transform Windows into a Microsoft LAN Manager
  118. server platform, thus adding a fourth server platform to the three
  119. currently supported by LAN Manager:  OS/2R, UNIX, and VMSR.
  120.  
  121. Windows NT does not require DOS to function.  However, it is
  122. compatible with the large installed base of DOS and Windows
  123. applications.  In addition to compatibility with existing
  124. applications, Windows NT includes the features required to meet the
  125. needs of the high-end desktop and server marketplace in the 1990s and
  126. beyond.
  127.  
  128. To support large server applications, Windows NT provides completely
  129. symmetric multiprocessor support.  With Windows NT, tasks are
  130. symmetrically distributed between processors on a per thread basis.
  131. This design provides maximum utilization of each processor in a
  132. multiprocessor system and simplifies the development of multiprocessor
  133. applications.
  134.  
  135. Security is required for network servers and many mission-critical
  136. applications.  To meet this need, Windows NT has been designed as a
  137. secure operating system.  Microsoft is working with the U.S.
  138. Government to certify Windows NT as C2-level secure.  In addition, the
  139. internal design of Windows NT can be enhanced in future releases to B-
  140. level security.
  141.  
  142. Windows NT is highly portable.  It is being developed concurrently on
  143. x86 and MIPS-based RISC platforms. MIPS-based computers will be
  144. available from more than 60 hardware manufacturers who are members of
  145. the ACE (Advanced Computing Environment) consortium.  With Windows NT,
  146. existing DOS and Windows programs will run unchanged on MIPS-based
  147. computers.
  148.  
  149. In addition to these advanced capabilities, the kernel-based design of
  150. Windows NT can be thought of as a nucleus which is compatible with
  151. different operating system environments.  The kernel design provides
  152. Windows NT compatibility with DOS and Windows applications.  It also
  153. allows Windows NT to support the OS/2 and POSIX application program
  154. interfaces, both of which are under development at Microsoft.  This
  155. design also allows Windows NT to support applications written to the
  156. new Windows 32-Bit application program interface.
  157.  
  158. Windows 32-Bit API
  159.  
  160. Developers and end-users have made enormous investments in Windows
  161. programming and Windows applications.  Most of these applications have
  162. been developed to run on both the 16-bit 80286 processor and the 32-
  163. bit 80386 and 80486 systems.  Although highly capable, programs
  164. written to the Windows 16-Bit API, which is supported by Windows 3.0,
  165. are constrained by the memory limits inherent in a 16-bit
  166. architecture.  Code must be divided into segments which cannot exceed
  167. 64K (65,536 bytes).  This makes programming more difficult.  It also
  168. imposes a performance penalty on high-performance 80486 and RISC-based
  169. systems.
  170.  
  171. The success of Windows Version 3.0, made it clear that an easy
  172. migration path from existing 16-bit Windows applications to a 32-bit
  173. programming interface was required.  Unfortunately, OS/2 Presentation
  174. ManagerTM (PM) was not an appropriate path.  Although similar in
  175. appearance from an end-user perspective, the programming details of
  176. Windows and PM are completely different.  So different in fact that
  177. most software developers found it necessary to completely rewrite
  178. their application when going from Windows to Presentation Manager.
  179. This is a major reason why there are so few OS/2 PM applications
  180. available.
  181.  
  182. The Windows 32-Bit API (Windows 32) has been designed to make the
  183. transition from the Windows 16-Bit API (Windows 16) to 32-bit as easy
  184. as possible.  Only minimal changes have been made to the syntax of the
  185. Windows 32 API.  The API names are the same as Windows 16.  The
  186. semantics are identical.  The message order is identical.  In fact, it
  187. is possible to keep a single source code base and compile that source
  188. code into both 16-bit and 32-bit programs (see Figure 4).
  189.  
  190. While the Windows 32 API is extremely compatible with the Windows-16
  191. API, it also contains significant new features.  These features
  192. include preemptive multitasked processes that use separate address
  193. spaces, preemptive threads, semaphores, shared memory, named pipes,
  194. mailslots, and memory mapped file I/O.  GDI (Graphics Device
  195. Interface) improvements include Bezier curves, paths, transforms, and
  196. a device-independent color model.
  197.  
  198. The Windows 32-Bit API is fully supported in both Windows Enhanced-
  199. mode and Windows NT-mode.  The Windows 32-Bit API will first be
  200. available in the Windows NT product during 1992.  It will be added to
  201. Windows Enhanced-mode in late 1992 or early 1993.  Programs written to
  202. the Windows 32-Bit API will run binary compatibly on both Windows NT-
  203. mode and Windows Enhanced-mode.  All Windows 32 features are supported
  204. by both Windows Enhanced-mode and Windows NT-mode, including
  205. preemptive multitasking.  Windows 32 programs will be fully source
  206. compatible between  x86 and MIPS processors.  Software Developer Kits
  207. for the Windows 32-Bit API will be available in late 1991.
  208.  
  209. The following highlights some key features of the Windows 32-Bit API.
  210.  
  211. Kernel: The Base Operating System
  212.  
  213. The Windows 32-Bit API on both Window NT-mode and Windows Enhanced-
  214. mode provides preemptive thread-based multitasking. It also runs all
  215. Windows 32-Bit and MS-DOS applications in separate address spaces so
  216. that they cannot corrupt one another.
  217.  
  218. The Windows 32-Bit API is designed to be portable beyond the 80386 and
  219. 80486 processors and in particular to be portable to RISC
  220. architectures. All these processors have different features but have
  221. in common 32-bit addressing and paged virtual memory architectures.
  222. Paged virtual memory is more efficient to implement and executes
  223. faster than segmented virtual memory. Memory management in Windows 32-
  224. Bit is secure because the operating system places different memory
  225. objects in different pages of memory and allows an application to
  226. control access permissions (Read, Write, Read/Write, Execute, and so
  227. on) to memory objects.
  228.  
  229. Given a large 32-bit address space, the operating system can
  230. conveniently and efficiently optimize file I/O because processes treat
  231. the file as a very large memory object and randomly access that
  232. object. The operating system, through page faulting, can detect read
  233. access to a file and bring in that data. It can detect when a shared
  234. file is written to and then write out that data. With process-settable
  235. access permissions and sparse allocation of physical memory pages,
  236. processes can implement very efficient data access, even when access
  237. patterns are entirely unpredictable.
  238.  
  239. GDI Improvements: Beziers, Paths, Transforms, Device-Independent Color
  240.  
  241. GDI, the drawing API for Windows Versions 3.0 and 3.1, provides a
  242. useful device-independent drawing set for applications. As output
  243. devices have become more sophisticated, so have drawing needs; hence
  244. GDI has been improved.
  245.  
  246. Some Windows applications for Versions 3.0 and 3.1 have needed to
  247. implement high-level graphics functions using the low-level drawing
  248. primitives of the Windows environment. Although this capability has
  249. provided application vendors flexibility in extending the Windows GDI,
  250. it has not allowed them to take seamless advantage of advances in
  251. printer and display technology. Application developers have had to
  252. code their own algorithms for displaying graphics such as Bezier
  253. curves and paths. With the Windows 32-Bit API, developers can call new
  254. high-level graphics features that will take advantage of the built-in
  255. drawing capabilities in advanced output hardware. Under Windows 32,
  256. displaying Bezier curves can be handled by the graphics engine or by
  257. output devices that have implemented Bezier optimizations.
  258.  
  259. The Windows 32 GDI is a complete and general-purpose drawing package.
  260. Bezier curves are a general-purpose curve primitive from which a
  261. straight line can also be derived. This function combined with the
  262. PolyBezier functionality makes it possible to draw any combination of
  263. continuous lines and curves.
  264.  
  265. Windows 32  adds a Path API. A BeginPath EndPath sequence "closes"
  266. the sequence of drawing primitives between Begin and End. Thus, a
  267. BeginPath, PolyPolyBezier, EndPath sequence makes it possible to draw
  268. an arbitrary number of different filled shapes.
  269.  
  270. The Windows 32 transform API maps the virtual two-dimensional surface
  271. on which you draw to the two-dimensional output surface. This API,
  272. combined with the TrueType font technology first available with
  273. Windows Version 3.1, makes it possible to draw truly device-
  274. independent graphics that the system can map to the display surface,
  275. including the rotation of bitmaps, fonts, and metafiles.
  276.  
  277. Windows 32 will also provide a device-independent color model.
  278. Computer monitors and color printers use different technology to
  279. render colors.  Additive mixing is used by computer monitors (RGB or
  280. Red, Green, Blue), while subtractive mixing (CYMK or Cyan, Yellow,
  281. Magenta, Black) is used by color printers.  Without device-independent
  282. color, the different approach used by monitors and printers can result
  283. in mismatched colors.
  284.  
  285. The Windowing System and System Classes
  286.  
  287. The Windows windowing system is called User.  The most significant
  288. change to User is the desynchronization of the per-window message
  289. queue from the system message queue. This change prevents errant,
  290. looping applications that stop processing their messages from blocking
  291. the computer system's entire user interface, thus making other
  292. applications unavailable.
  293.  
  294. With the addition of input queue time thresholds, the system can
  295. provide default handling for a looping or an otherwise nonresponsive
  296. process.  From an end-user perspective, this means the they can do
  297. other things while one application is busy.  For example, if a word
  298. processing program is busy printing a 100 page document, a user can
  299. minimize that application and begin working on a spreadsheet.  This
  300. effectively minimizes the time the user waits with an "hourglass" on
  301. their screen.
  302.  
  303. The desynchronization of the message queue is completely compatible
  304. with the Windows Versions 3.0 and 3.1 message model. The message
  305. ordering is the same. If WM_xyz came after WM_abc, it still does. This
  306. compatibility is entirely necessary because in Windows 32 systems,
  307. existing Windows applications run on top of the Windows 32-Bit message
  308. system. The messages are simply copied from the 32-bit stack to the
  309. 16-bit stack and passed onto the application; therefore message order
  310. cannot change.
  311.  
  312. Networking Extensions
  313.  
  314. Each time the APIs are further standardized in a particular area, it
  315. becomes easier to write significant new applications. Because of the
  316. variety of networking layers, ranging from network card interfaces and
  317. protocol stacks to the wide array of network IPC mechanisms,
  318. networking is probably the most confusing interface for developers
  319. today. Windows 32 will include standard network APIs that can replace
  320. those that network providers have previously needed to supply. Windows
  321. 32 will expose driver-style interfaces similar to the WinNet APIs
  322. provided by Windows Version 3.0 so that third-party vendors can plug
  323. their network services into the Windows open architecture.
  324.  
  325. Some of the new, 32-bit WinNet APIs being defined are file, print,
  326. named pipes, mailslots, server browsing and machine configuration.
  327. This means applications can rely on a consistent programming interface
  328. regardless of the underlying network.  Even if a network is not
  329. present, the APIs are still available and will return appropriate
  330. error codes.
  331.  
  332. The Windows 32-Bit API includes peer-to-peer named pipes, mailslots,
  333. and APIs to enable RPC (Remote Procedure Call) compilers. With Windows
  334. 32, a mail-server vendor can build a messaging service on named pipes
  335. and asynchrononous communication that will run on top of any network
  336. operating system, protocol stack, or network card - each of which
  337. could come from a different network vendor.
  338.  
  339. Compatibility with Windows 16-Bit APIs
  340.  
  341. Windows Version 3.0 and 3.1 applications will be able to run in
  342. Windows Enhanced-mode and Windows NT-mode systems that support the
  343. Windows 32 API. To be compatible with versions 3.0 and 3.1, all
  344. Windows 16 applications will run as one process in one address space.
  345. They will be nonpreemptive with respect to one another but preemptive
  346. with respect to the rest of the system, which mirrors their behavior
  347. under Windows Version 3.0 Enhanced-mode. Windows 16 applications run
  348. against the Windows 32-Bit APIs without a "layer" and without any
  349. state mapping or message reordering like that necessary to run them on
  350. OS/2 version 2.0.
  351.  
  352. Windows executables will also run on RISC-based Windows NT machines
  353. (see Figure 5).  Excellent performance is expected on this platform
  354. because although some code will be run against 80286 emulator
  355. technology, all Windows calls will be mapped directly to the Windows
  356. NT software.
  357.  
  358. Windows 32-bit APIs-The Future of Windows
  359.  
  360. Millions of people are actively using Windows Version 3.0 today.
  361. Corporations and independent software vendors are making major
  362. commitments to Windows and investments in Windows applications.
  363.  
  364. To protect this investment, Microsoft is evolving Windows into a
  365. complete architecture.  Through separate implementations, Microsoft
  366. Windows will run on vastly different types of hardware; from pen-based
  367. notepad computers to multiprocessor and RISC systems.
  368.  
  369. Windows NT and future versions of Windows Enhanced-mode will support
  370. the Windows 32-Bit APIs.  Designed to simplify migration of Windows
  371. applications from 16-bit to 32-bit, these APIs will also make it easy
  372. to develop new 32-bit Windows applications.  They contain significant
  373. new features which will enable a new generation of powerful Windows
  374. applications.
  375.  
  376. In addition, the Windows 32-Bit APIs will be used as the foundation
  377. for future versions of Windows under development at Microsoft.  This
  378. technology, often called Information at Your FingertipsTM, will make
  379. it even easier to use personal computers and will provide significant
  380. new functionality to Windows users.
  381.  
  382. Microsoft and MS-DOS are registered trademarks,Windows and Information
  383. at Your Fingertips are trademarks of Microsoft Corporation.
  384.  
  385. OS/2 is a registered trademark and Presentation Manager is a trademark
  386. licensed to Microsoft.
  387.  
  388. IBM is a registered trademark of International Business Machines.
  389.  
  390. VMS is a registered trademark of Digital Equipment Corporation.
  391.